package com.zhuoyue.common.utils;

/**
 * @author Administrator
 */
public class AsciiUtil {
    public static String stringToAscii(String value)
    {
        StringBuffer sbu = new StringBuffer();
        char[] chars = value.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if(i != chars.length - 1)
            {
                sbu.append(Integer.toHexString((int)chars[i]));
            }
            else {
                sbu.append(Integer.toHexString((int)chars[i]));
            }
        }
        return sbu.toString();
    }
}
